package com.pearlsoft.rms;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.pearlsoft.rms.vcenter.VappReconfig;

/**
 * 
 * @author rainshow
 * @Created 2012-5-15 上午09:51:43
 */

@Service("vcenterManager")
@Scope("singleton")
public class VcenterManagerImpl implements VcenterManager {

    private static Log logger = LogFactory.getLog(VcenterManagerImpl.class);
    private VappReconfig reconfig;

    @Override
    public void reconfig(VappConfig vapp) throws Exception {
        logger.info("开始调整项目[" + vapp.getName() + "]配置");
        reconfig.setDiskMode("persistent");
        reconfig.setStoreName("test");
        reconfig.reConfig(vapp);
    }

    @Autowired
    public void setReconfig(VappReconfig reconfig) {
        this.reconfig = reconfig;
    }

}
